<%@ page pageEncoding="UTF-8"%>

<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-nested" prefix="nested"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<script type='text/javascript' src='resources/js/tinymce/tiny_mce.js'></script>
<script type="text/javascript" src='resources/js/global/global.ca.js'></script>
<script type="text/javascript" src='resources/js/popup.js'></script>
<script>
	function tinyMCE_insert(content){
		//tinyMCE.getInstanceById("content").execCommand("mceFocus", false, "content");
		tinyMCE.getInstanceById("content").execCommand("mceInsertContent",false,content);
	}

	$(function(){
		$("#save").click(function(){
			
			var con=tinyMCE.getInstanceById("content").getContent();
			$.ajax({
					type: "POST",
					url: "admin/announce/save",
					data: {"con":con},
					success: function(data){
								
						   }
						 });
		});
	});
</script>
<div id="panel-left" style="margin-top:10px;margin-bottom:10px">
	<div id="box-news">
			<table cellspacing="0" cellpadding="0" width="98%">
				<tr>
					<td colspan="3">
						<table cellspacing="0" cellpadding="0" width="100%">
							<tr>
								<td class="title_banner_left"></td>
								<td class="title_banner_center"><span class="banner_header">修改通告</span></td>
								<td class="title_banner_right"></td>
							</tr>
						</table>
					</td>
				</tr>
                <tr>
                <td class="box_left"></td>
                <td>
                	<div style="margin-top:10px;" align="center">
	<table width="90%" cellpadding="0" cellspacing="0" border="0" style="text-align:center;" class="datagrid" >
    	<tr>
        <td>
     
        </td>
        </tr>
        <tr>
        	<td>
            	<div id="editorcontainer">
                	<textarea id="content" class="theEditor" tabindex="2" name="announceText" cols="40" rows="10" align="center" style="color: rgb(0, 0, 0); height: 330px; width:=1000px;">
						<logic:present name='result'>
									<bean:write name='result' property='announceText' />
						</logic:present>
					</textarea>
                </div>
           	  <!-- Editor Container Ends -->
            </td>
        </tr>
        <tr>
        	<td align="right">        
        	<input type="button" id="save" value="保存" class="btn"  />
            </td>
        </tr>
    </table>
   
</div>

                
                 </td>
                <td class="box_right"></td>
                </tr>
                <tr>
					<td class="box_btm_l"></td>
					<td class="box_btm_c" width="678px"></td>
					<td class="box_btm_r"></td>
				</tr>
			</table>
     </div>
</div>




<script type="text/javascript" src="resources/i18n/zh/editor/tiny_mce_zh.js" ></script>
<script type="text/javascript">

tinyMCE.init({
	// General options
	mode : "specific_textareas",
	editor_selector:"theEditor",
	width:"100%",
	theme : "advanced",
	convert_urls : false,
	plugins:"safari,inlinepopups,spellchecker,paste,wordpress,media,fullscreen,wpeditimage,wpgallery,tabfocus",
	
	/*plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,imagemanager,filemanager",*/

	// Theme options
	theme_advanced_buttons1 : "bold,italic,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink,wp_more,|,spellchecker,fullscreen,wp_adv",
	theme_advanced_buttons2 : "formatselect,underline,justifyfull,forecolor,|,pastetext,pasteword,removeformat,|,media,charmap,|,outdent,indent,|,undo,redo,wp_help",
	theme_advanced_buttons3 : "",
	theme_advanced_buttons4 : "",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true,
	theme_advanced_resize_horizontal : "", 
	dialog_type : "modal",
	
	language:"zh",

	// Example content CSS (should be your site CSS)
	skin:"wp_theme"

});	
	
</script>